import React from 'react'
import { Link,withRouter } from "react-router-dom";
import List from '../../pages/List/List';
import './Header.less'

 function Header(props) {
  //  console.log(props)
     let {title,back,register}=props;
  return (
    <div className='header'>
       {back?(<span className='back' onClick={()=>props.history.go(-1)}>返回</span>):null}
       
       <div className='text'>{title}</div>

       {register?(<Link to="/register" className='register'> 注册</Link>):null}
    </div>
  )
}
export default withRouter(Header)
